package chapter3.No3_2_方法join的使用.demo4;

/**
 * *：
 *    join(long)标识等待的时间，时间一到，马上执行后面的程序
 * Created by Administrator on 2016/11/20.
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        ThreadA a = new ThreadA();
        a.start();

        a.join(2000);
        System.out.println("只等2秒");
    }
}
